package com.mingtai.design.pattern.behavioralming.state;

/**
 * @description: 状态模式
 * @author: mingtai
 * @createDate: 0:22 2021/1/11
 * @version: 1.0
 * 状态之间的转换不需要再用if else去判断.比如:如果视频是暂定的状态,那么久不能快进
 */

public abstract class CourseVideoState {
    // 声明上下文 protected为了让子类能拿到这个属性
    protected CourseVideoContext courseVideoContext;

    public void setCourseVideoContext(CourseVideoContext courseVideoContext) {
        this.courseVideoContext = courseVideoContext;
    }

    public abstract void play();
    public abstract void speed();
    public abstract void pause();
    public abstract void stop();
}



